<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>医生登录</title>
  <script src="../../js/common.js"></script>
  <link rel="stylesheet" href="../../css/common.css">
  <link rel="stylesheet" href="../../css/doctor/login.css">
</head>

<body>
  <div class="container">
    <div class="loginLogo">
      <img src="../../images/doctor/loginLogo.png" alt="">
      <p>医生登录</p>
    </div>
    <div class="form">
      <form action="">
        <div class="userName clearfix">
          <div class="fl icon">
            <img src="../../images/doctor/userNameIcon.png" alt="">
          </div>
          <input type="number" placeholder="请输入登录手机号" class="fl" oninput="if(value.length>11)value=value.slice(0,11)" min="0" inputmode="numeric"
            pattern="[0-9]*" id="userName">
        </div>
        <div class="userName clearfix password">
          <div class="fl icon">
            <img src="../../images/doctor/lock.png" alt="">
          </div>
          <input type="password" placeholder="请输入您的密码" class="fl" id="password">
        </div>
        <button type="button" class="loginBtn">登&nbsp;录</button>
      </form>
<div class="AlertBlock" id="AlertBlock"></div>
    </div>

  </div>


</body>
<script src="../../js/jquery-1.11.3.min.js"></script>
<script>
  $(".loginBtn").click(function () {
    if ($("#userName").val() == "") {
      DoAlert("手机号码不能为空");
      return
    } else if (!(/^\S{1,}$/.test($("#userName").val()))) {
      DoAlert("请输入正确的手机号码");
      return
    }
    if ($("#password").val() == "") {
      DoAlert("密码不能为空");
      return
    }
  })
</script>

</html>
